//
//  CRHeadMyCell.m
//  NewAge
//
//  Created by dllo on 15/11/30.
//  Copyright © 2015年 ColorRevolution. All rights reserved.
//

#import "CRHeadMyCell.h"

@implementation CRHeadMyCell


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.myImageView = [[UIImageView alloc] init];
//        self.myImageView.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:self.myImageView];
        
        self.myLabel = [[UILabel alloc] init];
//        self.myLabel.backgroundColor = [UIColor blueColor];
        self.myLabel.textAlignment = 1;
        self.myLabel.textColor = [UIColor grayColor];
        [self.contentView addSubview:self.myLabel];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [self.myImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).with.offset(20);
        make.right.equalTo(self.contentView.mas_right).with.offset(-20);
        make.top.mas_equalTo(self.contentView.mas_top).with.offset(10);
        make.height.mas_equalTo(self.myImageView.mas_width);
    }];
    self.myImageView.layer.cornerRadius = self.myImageView.frame.size.width / 2;
    [self.myLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.contentView.mas_left);
        make.right.mas_equalTo(self.contentView.mas_right);
        make.top.mas_equalTo(self.myImageView.mas_bottom);
        make.height.equalTo(self.contentView).with.multipliedBy(1.0f / 4.0f);
    }];


}



@end
